# input()接收鍵盤的输入(字符串)，参数是提示文字，python中字符可以用单引号或双引号
# int()把字符串转换为整数

#输入销售金额
# tech = int(input('销售金额为(元)：'))
#
# if 0 <= tech <= 100000:
#     tech = tech * 0.1
# elif tech <= 200000:
#     tech = 100000 * 0.1 + (tech - 100000) * 0.075
# elif tech <= 400000:
#     tech = 100000 * ( 0.1 + 0.075 ) + (tech - 200000) * 0.005
# elif tech <= 6000000:
#     tech = 100000 * (0.1 + 0.075) + 200000 * 0.05 + (tech - 400000) * 0.003
# elif tech <= 1000000:
#     tech = 100000 * (0.1 + 0.075) + 200000 * (0.005 + 0.003) + (tech - 600000) * 0.0015
# elif tech > 1000000:
#     tech = 100000 * (0.1 + 0.075) + 200000 * (0.003 + 0.005) + 400000 * 0.0015 + (tech - 1000000) * 0.001
# print(f'提成为{tech}元')


#优化
tech = int(input('销售金额为(元)：'))
# 创建金额间隔长度数组，利率数组
grand = [100000, 100000, 200000, 200000, 400000, float('inf')]
ti = [0.1, 0.075, 0.05, 0.03, 0.015, 0.01]
totel = 0
#按段数来循环
for i in range(len(ti)):
    #比较满一个范围，拿满额的提成
    if tech > grand[i]:
        totel += ti[i] * grand[i]
        #算出不足下一范围的值
        tech -= grand[i]
    else:
        #不足下一范围的值的提成
        totel += tech * ti[i]
        break
print("总提成为：", totel)
